package com.project.server.service.garden.impl;

import com.project.common.core.domain.BaseServer;
import com.project.server.domain.garden.TGardenSupervisory;
import com.project.server.mapper.garden.TGardenSupervisoryMapper;
import com.project.server.service.garden.ITGardenSupervisoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 园区监控信息Service业务层处理
 *
 * @author project
 * @date 2021-07-01
 */
@Service
public class TGardenSupervisoryServiceImpl extends BaseServer implements ITGardenSupervisoryService {

    private static final Logger log = LoggerFactory.getLogger(TGardenSupervisoryServiceImpl.class);

    @Resource
    private TGardenSupervisoryMapper tGardenSupervisoryMapper;

    /**
     * 查询园区监控信息
     *
     * @param supervisoryId 园区监控信息ID
     * @return 园区监控信息
     */
    @Override
    public TGardenSupervisory selectTGardenSupervisoryById(Long supervisoryId) {
        return tGardenSupervisoryMapper.selectTGardenSupervisoryById(supervisoryId);
    }

    /**
     * 查询园区监控信息列表
     *
     * @param tGardenSupervisory 园区监控信息
     * @return 园区监控信息
     */
    @Override
    public List<TGardenSupervisory> selectTGardenSupervisoryList(TGardenSupervisory tGardenSupervisory) {
        return tGardenSupervisoryMapper.selectTGardenSupervisoryList(tGardenSupervisory);
    }

    /**
     * 新增园区监控信息
     *
     * @param tGardenSupervisory 园区监控信息
     * @return 结果
     */
    @Override
    public int insertTGardenSupervisory(TGardenSupervisory tGardenSupervisory) {
        super.insert(tGardenSupervisory);
        return tGardenSupervisoryMapper.insertTGardenSupervisory(tGardenSupervisory);
    }

    /**
     * 修改园区监控信息
     *
     * @param tGardenSupervisory 园区监控信息
     * @return 结果
     */
    @Override
    public int updateTGardenSupervisory(TGardenSupervisory tGardenSupervisory) {
        super.update(tGardenSupervisory);
        return tGardenSupervisoryMapper.updateTGardenSupervisory(tGardenSupervisory);
    }

    /**
     * 批量删除园区监控信息
     *
     * @param supervisoryIds 需要删除的园区监控信息ID
     * @return 结果
     */
    @Override
    public int deleteTGardenSupervisoryByIds(Long[] supervisoryIds) {
        return tGardenSupervisoryMapper.deleteTGardenSupervisoryByIds(supervisoryIds);
    }

    /**
     * 删除园区监控信息信息
     *
     * @param supervisoryId 园区监控信息ID
     * @return 结果
     */
    @Override
    public int deleteTGardenSupervisoryById(Long supervisoryId) {
        return tGardenSupervisoryMapper.deleteTGardenSupervisoryById(supervisoryId);
    }
}
